<?php
include_once "./request.php";

$openId = "TueU2W";
$openKey = "37fKYeAWs7GKXQpQgQh3P95ILZd0UfWY";

$ios_productCode = "91131120158043450755743622283983";
$android_productCode = "14802148287394050134777847863884";

$url = "http://quicksdk.dodjoy.com/open/goodsList";
$paltform = $_GET['paltform'];
$productCode = '';
if($paltform === 'ios') {
  $productCode = $android_productCode;
}
if($paltform === 'android') {
  $productCode = $ios_productCode;
}
if($productCode === '') {
  echo null;
  exit();
}

$params = array(
    "openId" => $openId,
    "productCode" => $productCode
);
$sign = getMd5Sign($params, $openKey);
$data = array(
    "openId" => $openId,
    "productCode" => $productCode,
    "sign" => $sign
);
$result = curl_post_request($url, $data);
echo $result;